# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=rsnapshot
pkgver=1.4.5
pkgrel=0
pkgdesc="Local and remote filesystem snapshot utility"
url="https://rsnapshot.org/"
arch="noarch"
license="GPL-2.0-or-later"
depends="perl rsync openssh-client"
makedepends="$depends_dev"
options="!check" # failing tests
subpackages="$pkgname-doc"
source="https://rsnapshot.org/downloads/rsnapshot-$pkgver.tar.gz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
6caa2d7c425d084d0bb393421a0ed1ba78fdd27f7d8cec4810bc4a9f88b3232aeff7e4682282178f7702e2adc7abc8e9201249bf2bcaa28faa16e30aaa62e18a  rsnapshot-1.4.5.tar.gz
"
